<?php

if (!defined('APP_ROOT')) define('APP_ROOT', dirname(__FILE__) . '/../../');
if (!defined('APP_INC')) define('APP_INC', APP_ROOT . '/../../inc/');
if (!defined('APP_LIB')) define('APP_LIB', APP_ROOT . '/../../lib/');

require_once(APP_ROOT . '/inc/config.php');

require_once(APP_ROOT . '/lib/tel/Cdr.class.php');

class NumberTest extends PHPUnit_Framework_TestCase {
  
	public function setUp() {
	}
	
	public function tearDown() { 
		
	}
	
	public function test_1() {
		
		$src = '116026';
		$sip = 'ns_sip';
		
		$cdr = new Cdr();
		
		$a = $cdr->_number($src, $sip);
		
		$ret = $a['s'] == '孙晓晔 [6026]' ? true : false;
	
		$this->assertTrue($ret);
	}
	
	public function test_2() {
		$src = '146026';
		$sip = 'ns_sip';
		
		$cdr = new Cdr();
		
		$a = $cdr->_number($src, $sip);
		
		$ret = $a['s'] == '永泰 [6026]' ? true : false;
	
		$this->assertTrue($ret);
	}
	
	
	
	
}
?>